package sequencing;

import anim.AnimFragments;
import anim.Matrix3D;

import java.util.Map;
import java.util.TreeMap;

public class BoneInfo implements Comparable <BoneInfo>
{   //动画
    public AnimFragments animFragments;
    //节点信息
    public GameObject object;
    //某块骨骼在某一帧的相对于root的transform
    public Map <String, Map <Integer, Matrix3D>> boneAnimTransformMap = new TreeMap <>();

    @Override
    public int compareTo(BoneInfo o)
    {
        if (this.object != null && o.object != null)
        {
            return this.object.compareTo(o.object);
        }
        else
        {
            return this.hashCode();
        }
    }

    @Override
    public String toString()
    {
        return object.toString() + "," + (animFragments != null);
    }
}
